﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Faust.Andrew.MTG.Player
{
	/// <summary>
	/// Interaction logic for PlanesControl.xaml
	/// </summary>
	public partial class PlanesControl : UserControl, IPlaneView
	{

        static PlanesControl()
        {
            PresenterProperty = DependencyProperty.Register("Presenter", typeof(GamePresenter), typeof(PlanesControl));
        }


        static DependencyProperty PresenterProperty;
        public GamePresenter Presenter
        {
            get
            {
                return (GamePresenter)base.GetValue(PresenterProperty);
            }
            set
            {
                base.SetValue(PresenterProperty, value);
            }
        }

		public PlanesControl()
		{
			this.InitializeComponent();
		}

		private void Planeswalk_Click(object sender, System.Windows.RoutedEventArgs e)
		{
            Presenter.Model.AttempPlaneswalk();	
		}

		private void Plane_PreviewDrop(object sender, System.Windows.DragEventArgs e)
		{
            Presenter.DropOnCard(Presenter.Model.CurrentPlane, e);
		}
	}
}